package ThinkInJava;

public class ThreadTest {

	public static String result = "hhh";
	public static void main(String[] args) {
		//由于新开的线程需要没有运行（就绪态）或者迟于return语句，导致最后直接将全局变量数据返回了
		String bb = getFrom("hhhhlm00", 5);
		
		System.out.println("is null" + bb);
	}
	public static String getFrom(final String a, final int b){
		new Thread(){
			String a = "nhk";
			int b = 5;
			@Override
			public void run() {
				try {
					//Thread.sleep(1000);
				} catch (Exception e) {
					e.printStackTrace();
				}
				result = a + b ;
			}
		}.start();
		return result;
	}
}
